package
{
	/**
	 * 
	 * @author Polar
	 * @date 2012-12-30
	 * @function 
	 * 
	 */

	
	import starling.core.Starling;
	import starling.display.MovieClip;
	import starling.display.Sprite;
	import starling.events.Event;
	import starling.textures.Texture;
	import starling.textures.TextureAtlas;
	
	public class Game3 extends Sprite
	{
		[Embed(source="res/1.png")]
		private static const mcPic:Class;
		
		[Embed(source="res/1.xml",mimeType="application/octet-stream")]
		private static const mcCfg:Class;
		
		private var _movieClip:MovieClip;
		
		
		public function Game3()
		{
			super();
			addEventListener(Event.ADDED_TO_STAGE,onAdded);
		}
		private function onAdded(e:Event):void
		{
			var mcTex:Texture = Texture.fromBitmap(new mcPic);
			var mcXML:XML = new XML(new mcCfg());
			var mcTexAltas:TextureAtlas = new TextureAtlas(mcTex,mcXML);
			
			var texs:Vector.<Texture> = mcTexAltas.getTextures("100");
			
			_movieClip = new MovieClip(texs,12);
			
			addChild(_movieClip);
			Starling.juggler.add(_movieClip);
			
		}
	}
}